Remove the --sync commandline option
authorMatthias Clasen <mclasen@redhat.com>
Thu, 16 Dec 2010 04:11:21 +0000 (23:11 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 21 Dec 2010 17:07:02 +0000 (12:07 -0500)
Remove the --sync option and remove the possibility of backend-specific
commandline options altogether. --sync is being replaced by
a GDK_SYNCHRONIZE environment variable.

docs/reference/gtk/running.sgml
docs/reference/gtk/x11.sgml
gdk/Makefile.am
gdk/gdk.c
gdk/x11/Makefile.am
gdk/x11/gdkdisplay-x11.c
gdk/x11/gdkglobals-x11.c [deleted file]
gdk/x11/gdkmain-x11.c
gdk/x11/gdkprivate-x11.h

index 4abbd9d1d9f9df6b7996cf4fa649a348592d5bd8..8119f236a2fdeab1a71c6b1eb3df6f6ff11b138a 100644 (file)
@@ -368,6 +368,15 @@ nevertheless.
   </para>
 </formalpara>
 
+<formalpara>
+  <title><envar>GDK_SYNCHRONIZE</envar></title>
+
+  <para>
+    If set, GDK makes all X requests synchronously. This is a useful
+    option for debugging, but it will slow down the performance considerably.
+  </para>
+</formalpara>
+
 <formalpara>
   <title><envar>XDG_DATA_HOME</envar>, <envar>XDG_DATA_DIRS</envar></title>
 
index 30600da04e8fe2667d5fedd70076bfe2548ac31f..e75bd2774bdadf0dbb91888d30ec20d531d9bfd2 100644 (file)
@@ -20,13 +20,13 @@ X11 aspects of using GTK+
 <title>GTK+ for the X Window System</title>
 
 <para>
-On UNIX, the X backend is the default build for GTK+. So 
-you don't need to do anything special when compiling it,
+On UNIX, the X backend is the default build for GTK+.
+So you don't need to do anything special when compiling it,
 and everything should "just work."
 </para>
 
 <para>
-To mix low-level Xlib routines into a GTK program, 
+To mix low-level Xlib routines into a GTK program,
 see <link linkend="gdk-X-Window-System-Interaction">GDK X Window
 System interaction</link> in the GDK manual.
 </para>
@@ -35,8 +35,7 @@ System interaction</link> in the GDK manual.
 <title>X11-specific commandline options</title>
 
 <para>
-The X backend understands some additional command line 
-arguments.
+The X backend understands some additional command line arguments.
 </para>
 
 <formalpara>
@@ -48,15 +47,6 @@ in the <envar>DISPLAY</envar> environment variable.
 </para>
 </formalpara>
 
-<formalpara>
-<title><systemitem>--sync</systemitem></title>
-
-<para>
-Makes all X requests synchronously. This is a useful option for
-debugging, but it will slow down the performance considerably.
-</para>
-</formalpara>
-
 </refsect2>
 
 </refsect1>
index 0e980493fecbde2e85768b0c0fd4757ce7523910..12b6fd6340d5257ebf8cae8a8b40b45713d3427a 100644 (file)
@@ -13,13 +13,13 @@ DIST_SUBDIRS = win32 x11 quartz tests
 
 CLEANFILES =
 
-EXTRA_DIST +=                  \
+EXTRA_DIST +=                  \
        keynames.txt            \
        keyname-table.h         \
        gen-keyname-table.pl    \
-       gdkconfig.h.win32       \
+       gdkconfig.h.win32       \
        gdkkeysyms-update.pl    \
-       gdk.def                 \
+       gdk.def                 \
        gdkmarshalers.list      \
        gdkwindowimpl.h         \
        makeenums.pl            \
@@ -29,12 +29,12 @@ EXTRA_DIST +=                       \
        gdkenumtypes.h.template \
        abicheck.sh
 
-INCLUDES =                              \
+INCLUDES =                             \
        -DG_LOG_DOMAIN=\"Gdk\"          \
        -DGDK_COMPILATION               \
        -I$(top_srcdir)                 \
        -I$(top_builddir)/gdk           \
-       $(GTK_DEBUG_FLAGS)              \
+       $(GTK_DEBUG_FLAGS)              \
        $(GDK_DEP_CFLAGS)
 
 gtarget=$(gdktarget)
@@ -46,12 +46,12 @@ endif
 # libtool stuff: set version and export symbols for resolving
 # since automake doesn't support conditionalized libsomething_la_LDFLAGS
 # we use the general approach here
-LDADD = \
-       $(GTK_LINK_FLAGS)                                               \
-       -version-info $(LT_VERSION_INFO)                                \
-       -export-dynamic                                                 \
-       -rpath $(libdir)                                                \
-       $(no_undefined)                                                 \
+LDADD =                                        \
+       $(GTK_LINK_FLAGS)                       \
+       -version-info $(LT_VERSION_INFO)        \
+       -export-dynamic                         \
+       -rpath $(libdir)                        \
+       $(no_undefined)                         \
        $(LIBTOOL_EXPORT_OPTIONS)
 
 #
@@ -60,7 +60,7 @@ LDADD = \
 #
 # GDK header files for public installation (non-generated)
 #
-gdk_public_h_sources =                         \
+gdk_public_h_sources =                                 \
        gdk.h                                   \
        gdkapplaunchcontext.h                   \
        gdkcairo.h                              \
@@ -90,11 +90,11 @@ gdk_public_h_sources =                              \
        gdkvisual.h                             \
        gdkwindow.h
 
-gdk_built_public_sources =                     \
+gdk_built_public_sources =                     \
        gdkconfig.h                             \
        gdkenumtypes.h
 
-gdk_private_headers =                          \
+gdk_private_headers =                          \
        gdkapplaunchcontextprivate.h            \
        gdkdevicemanagerprivate.h               \
        gdkdeviceprivate.h                      \
@@ -108,33 +108,33 @@ gdk_private_headers =                             \
        gdkvisualprivate.h                      \
        gdkpoly-generic.h
 
-gdk_c_sources =                 \
-       gdk.c                   \
-       gdkapplaunchcontext.c   \
-       gdkcairo.c              \
-       gdkcolor.c              \
-       gdkcursor.c             \
-       gdkdevice.c             \
-       gdkdevicemanager.c      \
-       gdkdisplay.c            \
-       gdkdisplaymanager.c     \
-       gdkdnd.c                \
-       gdkevents.c             \
-       gdkglobals.c            \
-       gdkkeys.c               \
-       gdkkeyuni.c             \
-       gdkoffscreenwindow.c    \
-       gdkpango.c              \
-       gdkpixbuf-drawable.c    \
-       gdkrectangle.c          \
-       gdkrgba.c               \
-       gdkscreen.c             \
-       gdkselection.c          \
-       gdkvisual.c             \
-       gdkwindow.c             \
+gdk_c_sources =                                \
+       gdk.c                                   \
+       gdkapplaunchcontext.c                   \
+       gdkcairo.c                              \
+       gdkcolor.c                              \
+       gdkcursor.c                             \
+       gdkdevice.c                             \
+       gdkdevicemanager.c                      \
+       gdkdisplay.c                            \
+       gdkdisplaymanager.c                     \
+       gdkdnd.c                                \
+       gdkevents.c                             \
+       gdkglobals.c                            \
+       gdkkeys.c                               \
+       gdkkeyuni.c                             \
+       gdkoffscreenwindow.c                    \
+       gdkpango.c                              \
+       gdkpixbuf-drawable.c                    \
+       gdkrectangle.c                          \
+       gdkrgba.c                               \
+       gdkscreen.c                             \
+       gdkselection.c                          \
+       gdkvisual.c                             \
+       gdkwindow.c                             \
        gdkwindowimpl.c
 
-gdk_built_sources =                            \
+gdk_built_sources =                            \
        gdkenumtypes.c                          \
        gdkmarshalers.h                         \
        gdkmarshalers.c                         \
@@ -201,7 +201,6 @@ x11_introspection_files =           \
        x11/gdkeventsource.c            \
        x11/gdkeventtranslator.c        \
        x11/gdkgeometry-x11.c           \
-       x11/gdkglobals-x11.c            \
        x11/gdkim-x11.c                 \
        x11/gdkkeys-x11.c               \
        x11/gdkmain-x11.c               \
index c0b5d0ad2facd480e993f85bc341f3238aaa5249..6ab3caf151a2160974889684e50bcb74fae82cdd 100644 (file)
--- a/gdk/gdk.c
+++ b/gdk/gdk.c
@@ -177,15 +177,14 @@ static const GOptionEntry gdk_args[] = {
 /**
  * gdk_add_option_entries_libgtk_only:
  * @group: An option group.
- * 
+ *
  * Appends gdk option entries to the passed in option group. This is
  * not public API and must not be used by applications.
- **/
+ */
 void
 gdk_add_option_entries_libgtk_only (GOptionGroup *group)
 {
   g_option_group_add_entries (group, gdk_args);
-  g_option_group_add_entries (group, _gdk_windowing_args);
 }
 
 void
@@ -260,7 +259,6 @@ gdk_parse_args (int    *argc,
   g_option_context_set_main_group (option_context, option_group);
 
   g_option_group_add_entries (option_group, gdk_args);
-  g_option_group_add_entries (option_group, _gdk_windowing_args);
 
   if (!g_option_context_parse (option_context, argc, argv, &error))
     {
index d05a03355c955ac046272723a22df80dd2148789..72487ae51841c669c5f8af616a61d6787cc02a63 100644 (file)
@@ -16,42 +16,41 @@ LDADDS = $(GDK_DEP_LIBS)
 
 noinst_LTLIBRARIES = libgdk-x11.la
 
-libgdk_x11_la_SOURCES =        \
-       MwmUtil.h               \
+libgdk_x11_la_SOURCES =        \
+       MwmUtil.h               \
        gdkapplaunchcontext-x11.c \
        gdkasync.c              \
        gdkasync.h              \
-       gdkcursor-x11.c         \
+       gdkcursor-x11.c         \
        gdkdevice-core.h        \
        gdkdevice-core.c        \
-       gdkdevicemanager-core.h \
-       gdkdevicemanager-core.c \
+       gdkdevicemanager-core.h \
+       gdkdevicemanager-core.c \
        gdkdevicemanager-x11.c  \
        gdkdisplaymanager-x11.c \
        gdkdisplay-x11.c        \
        gdkdisplay-x11.h        \
-       gdkdnd-x11.c            \
+       gdkdnd-x11.c            \
        gdkeventsource.c        \
        gdkeventsource.h        \
        gdkeventtranslator.c    \
        gdkeventtranslator.h    \
        gdkgeometry-x11.c       \
-       gdkglobals-x11.c        \
        gdkim-x11.c             \
        gdkkeys-x11.c           \
-       gdkmain-x11.c           \
-       gdkproperty-x11.c       \
+       gdkmain-x11.c           \
+       gdkproperty-x11.c       \
        gdkscreen-x11.c         \
        gdkscreen-x11.h         \
-       gdkselection-x11.c      \
+       gdkselection-x11.c      \
        gdktestutils-x11.c      \
-       gdkvisual-x11.c         \
-       gdkwindow-x11.c         \
+       gdkvisual-x11.c         \
+       gdkwindow-x11.c         \
        gdkwindow-x11.h         \
        gdkxftdefaults.c        \
-       gdkxid.c                \
-       gdkx.h                  \
-       gdkprivate-x11.h        \
+       gdkxid.c                \
+       gdkx.h                  \
+       gdkprivate-x11.h        \
        xsettings-client.h      \
        xsettings-client.c      \
        xsettings-common.h      \
@@ -59,14 +58,14 @@ libgdk_x11_la_SOURCES =     \
 
 if XINPUT_XFREE
 libgdk_x11_la_SOURCES +=       \
-       gdkdevicemanager-xi.c   \
-       gdkdevicemanager-xi.h   \
+       gdkdevicemanager-xi.c   \
+       gdkdevicemanager-xi.h   \
        gdkdevice-xi.c          \
        gdkdevice-xi.h
 if XINPUT_2
 libgdk_x11_la_SOURCES +=       \
-       gdkdevicemanager-xi2.c  \
-       gdkdevicemanager-xi2.h  \
+       gdkdevicemanager-xi2.c  \
+       gdkdevicemanager-xi2.h  \
        gdkdevice-xi2.c         \
        gdkdevice-xi2.h
 endif
index 88f8c98adc5caa2de552221d439af2716e8900d2..6f755dc67af7a140eb32713a611d94ef395c4146 100644 (file)
@@ -1357,12 +1357,12 @@ _gdk_x11_display_open (const gchar *display_name)
       }
   }
 
-  if (_gdk_synchronize)
+  if (g_getenv ("GDK_SYNCHRONIZE"))
     XSynchronize (display_x11->xdisplay, True);
-  
+
   class_hint = XAllocClassHint();
   class_hint->res_name = g_get_prgname ();
-  
+
   class_hint->res_class = (char *)gdk_get_program_class ();
 
   /* XmbSetWMProperties sets the RESOURCE_NAME environment variable
@@ -1370,7 +1370,7 @@ _gdk_x11_display_open (const gchar *display_name)
    */
   argc = 1;
   argv[0] = g_get_prgname ();
-  
+
   XmbSetWMProperties (display_x11->xdisplay,
                      display_x11->leader_window,
                      NULL, NULL, argv, argc, NULL, NULL,
diff --git a/gdk/x11/gdkglobals-x11.c b/gdk/x11/gdkglobals-x11.c
deleted file mode 100644 (file)
index 15144e7..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/* GDK - The GIMP Drawing Kit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/*
- * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
- * file for a list of people on the GTK+ Team.  See the ChangeLog
- * files for a list of changes.  These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
- */
-
-#include "config.h"
-
-#include "gdktypes.h"
-#include "gdkprivate-x11.h"
-
-#include <stdio.h>
-
-gboolean          _gdk_synchronize = FALSE;
index a09d589fc670283b9226ea5866d8f7c5e49d5be9..b3de1684ab641a426ea5f84019fe7858c33b17ed 100644 (file)
@@ -87,12 +87,6 @@ static int       gdk_x_io_error               (Display     *display);
  */
 static GQueue gdk_error_traps;
 
-const GOptionEntry _gdk_windowing_args[] = {
-  { "sync", 0, 0, G_OPTION_ARG_NONE, &_gdk_synchronize, 
-    /* Description of --sync in --help output */ N_("Make X calls synchronous"), NULL },
-  { NULL }
-};
-
 void
 _gdk_x11_windowing_init (void)
 {
index 5fb3b8a42492b0654e5cb7d0c7fdb3feee8a2906..1a2db5ff1522e74c2246f2f144c0465bf13fa9df 100644 (file)
@@ -219,8 +219,6 @@ cairo_surface_t * _gdk_x11_window_create_bitmap_surface (GdkWindow *window,
 
 extern const gint        _gdk_x11_event_mask_table[];
 extern const gint        _gdk_x11_event_mask_table_size;
-extern GdkAtom           _gdk_selection_property;
-extern gboolean          _gdk_synchronize;
 
 #define GDK_SCREEN_DISPLAY(screen)    (GDK_SCREEN_X11 (screen)->display)
 #define GDK_SCREEN_XROOTWIN(screen)   (GDK_SCREEN_X11 (screen)->xroot_window)